Restore leading space to right-margin stamps in ERC
authorF. Jason Park <jp@neverwas.me>
Mon, 11 Mar 2024 06:09:59 +0000 (23:09 -0700)
committerF. Jason Park <jp@neverwas.me>
Sat, 23 Mar 2024 22:10:32 +0000 (15:10 -0700)
commitb9bd78f78d62383f2ff84ceecf8e490193594f17
tree300151d0f0a468e83513ab3f47006a02513075b8
parent525bc083155030b58de08c8716fec9db1496aa9d
Restore leading space to right-margin stamps in ERC

* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Insert a single
space character immediately before right-side stamps managed by
`erc-stamp--display-margin-mode'.  Include it as part of the
`timestamp' field.  This behavior was originally present in an earlier
draft of the changes for bug#60936, mainly to favor symmetry between
hard-wrapped fill styles and fill-wrap with regard to stamps.  It was
subsequently removed to simplify management, so that the `field' and
`display' intervals aligned.
* test/lisp/erc/erc-stamp-tests.el
(erc-stamp--display-margin-mode--right): Update expected output.

; test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
; Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
; Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Add space.
12 files changed:
lisp/erc/erc-stamp.el
test/lisp/erc/erc-stamp-tests.el
test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld
test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld
test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld